<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" scroll="no">
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>EHS门户</title>
<link rel="shortcut icon" href="${res}favicon.ico" type="image/x-icon" />
 <!--Basic Styles-->
<link href="../framework/css/font.css" rel="stylesheet" />
<link href="../framework/miniui/themes/material/miniui.css" rel="stylesheet" />
<link href="../framework/css/app.min.1.css" rel="stylesheet" type="text/css" />
<link href="../framework/css/app.min.2.css" rel="stylesheet" type="text/css" />
<link href="../vendors/home/css/home.css" rel="stylesheet" />

<script src="../framework/main.js" type="text/javascript"></script>
<style type="text/css">
	.input-group-addon{width:160px;text-align: right;}
	html, html body {padding:0;border:0;margin:0;width:100%;height:100%;overflow:hidden;}
</style>

</head>
<body>
	<div>
		<div class="ehsmessage">
			<span class="ehscontent">系统提示</span>
		</div>
	
		<div id="calendar" showDaysHeader="false" showClearButton="false" showTodayButton="false"
			 class="mini-calendar" style="width:90%; height:200px; margin: 20px auto;"value="new Date();"  onvaluechanged="onValueChanged" showTime="false" ondateclick="onDateClick"></div>
		
		<div id="dgApprove" class="mini-datagrid z-depth-1" style="width:100%;height:100%;" method="EHSSchedule.grid" showPageInfo="fasle"
			 showPager="true"  showPageIndex="false" idField="ID" >
		    <div property="columns">
	            <div field="ProjectName" width="45%">项目名称</div>
	            <div field="Title" width="45%">审批任务</div>
	           	<div field="AddTime" dateFormat="yyyy-MM-dd HH:mm:ss" width="45%">开始时间</div>
	           	<div field="Link" width="10%" renderer="action">操作</div>
		    </div>
		</div>
		
		<div id="currentApp">
			<ul class="ehsapply">
				<li class="ehsapply-list">
					<a href="${ctx}hub?app=RC" target="_blank" class="ehsapply-item">
						 <div class="ehsapply-icon"><img src="../vendors/home/images/esh01.png"></div>
						 <p title="安全风险分级管控系统">安全风险分级管控系统</p>
					</a>
				</li>
				<li class="ehsapply-list">
					<a href="${ctx}hub?app=PC" target="_blank" class="ehsapply-item">
						<div class="ehsapply-icon"><img src="../vendors/home/images/esh02.png"></div>
						<p title="企业隐患排查治理系统">企业隐患排查治理系统</p>
					</a>
				</li>
				<li class="ehsapply-list">
					<a href="${ctx}hub?app=RE" target="_blank" class="ehsapply-item">
						<div class="ehsapply-icon"><img src="../vendors/home/images/esh03.png"></div>
						<p title="企业安全风险评估系统">企业安全风险评估系统</p>
					</a>
				</li>
			</ul>
		</div>
		
		<div id="futureApp">
			<ul class="ehsapply notonline">
				<li class="ehsapply-list">
					<a href="javascript:void(0)" class="ehsapply-item">
						<div class="ehsapply-icon"><img src="../vendors/home/images/esh040.png"></div>
						<p title="安全培训系统">安全培训系统 </p>
					</a>
				</li>
				<li class="ehsapply-list">
					<a href="javascript:void(0)" class="ehsapply-item">
						<div class="ehsapply-icon"><img src="../vendors/home/images/esh050.png"></div>
						<p title="">规范制度系统</p>
					</a>
				</li>
				<li class="ehsapply-list">
					<a href="javascript:void(0)" class="ehsapply-item">
						<div class="ehsapply-icon"><img src="../vendors/home/images/esh060.png"></div>
						<p title=""> 应急管理系统</p>
					</a>
				</li>
				<li class="ehsapply-list">
					<a href="javascript:void(0)" class="ehsapply-item">
						<div class="ehsapply-icon"><img src="../vendors/home/images/esh070.png"></div>
						<p title="">安全生产标准化自评系统</p>  
					</a>
				</li>
				<li class="ehsapply-list">
					<a href="javascript:void(0)" class="ehsapply-item">
						<div class="ehsapply-icon"><img src="../vendors/home/images/esh080.png"></div>
						<p title="">高危作业管理系统</p>
					</a>
				</li>
				<li class="ehsapply-list">
					<a href="javascript:void(0)" class="ehsapply-item">
						<div class="ehsapply-icon"><img src="../vendors/home/images/esh090.png"></div>
						<p title="重大危险源辨识管理系统 ">重大危险源辨识管理系统</p>
					</a>
				</li>
				<li class="ehsapply-list">
					<a href="javascript:void(0)" class="ehsapply-item">
						<div class="ehsapply-icon"><img src="../vendors/home/images/esh100.png"></div>
						<p title="">职业卫生管理系统</p>
					</a>
				</li>
				<li class="ehsapply-list">
					<a href="javascript:void(0)" class="ehsapply-item">
						<div class="ehsapply-icon"><img src="../vendors/home/images/esh110.png"></div>
						<p title="">安全预警管理系统</p>
					</a>
				</li>
			</ul>
		</div>
	</div>
</body>
<link href="../framework/vendors/portal/portal.css" rel="stylesheet" type="text/css" />
<script src="../framework/vendors/portal/Portal.js"></script>
<script type="text/javascript">

    var portal = new mini.ux.Portal();
    portal.set({
        style: "width: 100%;height:300",
        columns: ["40%", "60%"]
    });
    portal.render(document.body);

    //panel
    portal.setPanels([
        { column: 0, id: "p1", title: "日历", body: "#calendar", showCloseButton: false, height: 300, allowDrag: false},
        { column: 0, id: "p2", title: "已启用的系统", body: "#currentApp", showCloseButton: false, height: 500, allowDrag: false},

        { column: 1, id: "p3", title: "我的待办", body: "#dgApprove", showCloseButton: false, height: 300, allowDrag: false},
        { column: 1, id: "p4", title: "敬请期待的系统", body: "#futureApp", showCloseButton: false, height: 500, allowDrag: false},
       
    ]);
    
    Page.onLoad(function(){
		mini.get('dgApprove').load();
	});
    
    function processTask (title, link) {
		mini.open({
			width: "80%",
			height :"80%",
			title : title,
			url : "${ctx}" + link
		});
	}
    
    function action(e) {
		var record = e.record
		e.cellStyle = "text-align:center";
        return '<a href="javascript:void(0);" onclick="processTask(\'' + record.Title + '\',\''+record.Link+'\');">审批</a>';
	}
    
    
   
</script>

</html>
